package code;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

import java.util.*;

/**
 *
 * @author jyotesh
 */
public class ArrayListWrapper extends ArrayList<Integer> {
    
    ArrayListWrapper() {
        super();
    }
    
    @Override
    public boolean equals(Object obj) {
        if (obj instanceof ArrayListWrapper == false)
            return false;
        Integer[] thisList = new Integer[this.size()];
        this.toArray(thisList);
        Integer[] otherList = new Integer[((ArrayListWrapper)obj).size()];
        ((ArrayListWrapper)obj).toArray(otherList);
        Arrays.sort(thisList);
        Arrays.sort(otherList);
        return Arrays.equals(thisList, otherList);
    }

    @Override
    public int hashCode() {
        int hash = 7;
        return hash;
    }
}
